﻿@model IEnumerable<Model1.Groep>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Naam)
        </th>
        <th></th>
    </tr>

@foreach (Model1.Groep item in Model)
{
    <table style="">
        <h3>@item.Naam</h3>
        @foreach (Model1.Specificatie item2 in item.Specificaties)
        {
            <tr>
                <td style="width: 200px; padding: 0 10px; border: solid 1px #a7a7a7; background-color: #cbcaca; ">
                   <b>@item2.Naam</b>
                </td>
                @foreach (Model1.Waarde item3 in item2.Waardes)
                {
                    <td style="width: 150px; border: solid 1px #a7a7a7; padding: 0 5px;">
                        @item3.Naam
                    </td>
                }
            </tr>
        }
    </table>
}

</table>

<table>
    <tr>
        @foreach (Model1.Groep item in Model)
        {
            foreach (Model1.Specificatie item2 in item.Specificaties)
            {
                <td width="200" style="width: 200px; padding: 0 10px; border: solid 1px #a7a7a7; background-color: #cbcaca; ">
                    <b>@item2.Naam</b>
                </td>
            }
        }

    </tr>
</table>